<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<head>
<title>Market place</title>
</head>
<f:view>
	<body>
		<ui:composition>
			
				<f:event listener="#{locationController.init}"
					type="preRenderComponent"></f:event>
				<p:dataTable var="location" value="#{locationController.model.list}"
					rows="20" rowKey="#{location.id}" resizableColumns="true"
					selection="#{locationModel.current}" selectionMode="single">
					<p:ajax event="rowSelect"
						listener="#{locationController.onRowSelect}"></p:ajax>
					<p:column>
						<f:facet name="header">
						id
					</f:facet>
						<h:outputText value="#{location.id}" />
					</p:column>
					<p:column sortBy="#{location.number}" filterBy="#{location.number}"
						filterMatchMode="contains">
						<f:facet name="header">
						number
					</f:facet>
						<h:outputText value="#{location.number}" />
					</p:column>
					<p:column sortBy="#{location.type}" filterBy="#{location.type}"
						filterMatchMode="contains">
						<f:facet name="header">
						type
					</f:facet>
						<h:outputText value="#{location.type}" />
					</p:column>
					<p:column sortBy="#{location.name}" filterBy="#{location.name}"
						filterMatchMode="contains">
						<f:facet name="header">
						name
					</f:facet>
						<h:outputText value="#{location.name}" />
					</p:column>
					<ui:remove>
						<p:column sortBy="#{location.district}"
							filterBy="#{location.district}" filterMatchMode="contains">
							<f:facet name="header">
						district
					</f:facet>
							<h:outputText value="#{location.district}" />
						</p:column>
					</ui:remove>
					<p:column sortBy="#{location.address}"
						filterBy="#{location.address}" filterMatchMode="contains">
						<f:facet name="header">
						address
					</f:facet>
						<h:outputText value="#{location.address}" />
					</p:column>
					<p:column sortBy="#{location.contactPerson}"
						filterBy="#{location.contactPerson}" filterMatchMode="contains">
						<f:facet name="header">
						contact person
					</f:facet>
						<h:outputText value="#{location.contactPerson}" />
					</p:column>
					<p:column sortBy="#{location.telephone}"
						filterBy="#{location.telephone}" filterMatchMode="contains">
						<f:facet name="header">
						telephone
					</f:facet>
						<h:outputText value="#{location.telephone}" />
					</p:column>
				</p:dataTable>
		</ui:composition>
	</body>
</f:view>
</html>